#ifndef __TRANS_H__
#define __TRANS_H__

#include <stdlib.h>

#define ERR(msg) do {   \
    perror(msg);    \
    printf("%s:%s %d\n", __FILE__, __func__, __LINE__); \
    exit(EXIT_FAILURE); \
} while(0)

#define BUFSIZE 128

typedef struct {
    int type;
    char msg[BUFSIZE];
}msg_t;

#endif

